'use strict'

import User from "../models/User.js"

class UserService {

  async create(user) {
    const newUser = User.create(user)
    return newUser
  }

  async getAll() {
    const users = await User.find()
    return users
  }
}

export default new UserService()